#include "geometry.h"
#include <iostream>

int main()
{
   int n, m;
   point p;
   std::cin >> n;
   std::vector<point> polygon(n);
   for (int i = 0; i < n; i++)
      std::cin >> polygon[i].x >> polygon[i].y;
   std::cin >> m;
   for (int i = 0; i < m; i++)
   {
      std::cin >> p.x >> p.y;
      if (in_polygon(polygon, p))
         std::cout << "YES" << "\n";
      else
         std::cout << "NO" << "\n";
   }
   return 0;
}